<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<section class="">
    <div class="row">
        <!--无数据提示 开始-->
        <section th:if="${#lists.isEmpty(giftCardList)}" class="no-data__wrap">
            <span class="no-data-ico"></span>
            <p class="mt20"><span class="c-666">您还没有礼品卡~~~</span></p>
        </section>
        <!--无数据提示 结束-->
        <section th:if="${!#lists.isEmpty(giftCardList)}" th:each="giftCard:${giftCardList}" class="col-sm-4">
            <div th:if="${giftCard['giftCard']['cardType']}==2" class="giftCard__wrap course-giftCard pr">
                <div class="">
                    <p class="mt20">
                        <span>卡号：</span>
                        <strong th:text="${giftCard['code']}"></strong>
                    </p>
                    <p>
                        <span>密码：</span>
                        <strong th:text="${giftCard['codePwd']}"></strong>
                    </p>
                    <th:block th:if="!${#strings.isEmpty(giftCard['beginTime'])}">
                        <section class="endTime" th:attr="data-endTime=${giftCard['endTime']},data-id=${giftCard['id']}">
                            <span th:text="'有效期：' + ${#strings.substring(giftCard['beginTime'],0,10)}+'至'+${#strings.substring(giftCard['endTime'],0,10)}"></span>
                        </section>
                    </th:block>
                </div>
                <aside th:if="${giftCard['useType']}==2" class="u-giftCards-use_ico u-coupon-overdue_ico"></aside>
            </div>
            <div th:if="${giftCard['giftCard']['cardType']}==3" class="giftCard__wrap delta-giftCard pr">
                <div>
                    <section class="mt5 text-center">
                        <span><i class="fa fa-cny"></i></span>
                        <strong class="fs36" th:text="${giftCard['giftCard']['amount']}"></strong>
                    </section>
                    <section class="text-right">
                        <span class="fs12" >本卡只限购买课程，不可提现</span>
                    </section>
                    <section class="text-right endTime" th:attr="data-endTime=${giftCard['endTime']},data-id=${giftCard['id']}">
                        <span th:text="有效期： + ${#strings.substring(giftCard['beginTime'],0,10)}+'至'+${#strings.substring(giftCard['endTime'],0,10)}"></span>
                    </section>
                </div>
                <aside th:if="${giftCard['useType']}==2" class="u-giftCards-use_ico u-coupon-overdue_ico"></aside>
            </div>
            <div th:if="${giftCard['giftCard']['cardType']}==1" class="giftCard__wrap student-giftCard pr">
                <div>
                    <section class="mt5 text-center">
                        <span><i class="fa fa-cny"></i></span>
                        <strong class="fs36" th:text="${giftCard['giftCard']['amount']}"></strong>
                    </section>
                    <section class="clearfix">
                        <span class="fs12 pull-right hand" data-toggle="tooltip" data-placement="bottom" data-original-title="<div class='text-left pt10'>1、会计从业资格三讲课程（有效期至2018.02.12）</div><div class='text-left pt10 pb10'>2、金融从业资格证书（有效期至2017.12.22）</div>">本卡内包含 <i class="fa fa-angle-down"></i></span>
                    </section>
                    <section class="text-right endTime" th:attr="data-endTime=${giftCard['endTime']},data-id=${giftCard['id']}">
                        <span th:text="有效期： + ${#strings.substring(giftCard['beginTime'],0,10)}+'至'+${#strings.substring(giftCard['endTime'],0,10)}"></span>
                    </section>
                </div>
                <aside th:if="${giftCard['useType']}==2" class="u-giftCards-use_ico u-coupon-overdue_ico"></aside>
            </div>
            <div class="mb20 pb10 text-center">
                <button th:if="${giftCard['useType']}==1" type="button" th:attr="data-id=${giftCard['id']}" class="btn btn-w-m btn-outline btn-danger btn-rounded activation">激 活</button>
                <button th:if="${giftCard['useType']}==2" type="button" th:attr="data-id=${giftCard['id']}" class="btn btn-w-m btn-default btn-rounded">已激活</button>
            </div>
        </section>
    </div>
</section>